<?php

namespace app\common\view;

/**
 * Created by PhpStorm.
 * User: yangxin
 * Date: 25/12/2016
 * Time: 20:32
 */
class LTEPaginator extends \think\paginator\driver\Bootstrap
{
    public function render()
    {
        if ($this->hasPages()) {
            if ($this->simple) {
                return sprintf(
                    '<ul class="pager">%s %s</ul>',
                    $this->getPreviousButton(),
                    $this->getNextButton()
                );
            } else {
                return sprintf(
                    '<ul class="pagination pagination-sm no-margin pull-right">%s %s %s</ul>',
                    $this->getPreviousButton(),
                    $this->getLinks(),
                    $this->getNextButton()
                );
            }
        }
    }
}